language = "C"

# Meta
header = "/* TODO: put license information */"
autogen_warning =  "/* THIS FILE IS GENERATED AUTOMATICALLY WITH CBINDGEN. DO NOT EDIT MANUALLY. */\n/* ANY CHANGES WILL BE OVERRIDEN. PLEASE MODIFY `build.rs` TO APPLY PATCHES. */"
trailer = ""
include_version = true

# Include optoins
pragma_once = true
includes = []
sys_includes = []
after_includes = ""
include_guard = "GIGACHAT_SQLITE_ORM"

# Style options
# style = "Tag"
braces = "SameLine"
line_length = 120
line_endings = "LF"
tab_width = 8

# Documentation options
documentation = true
documentation_style = "c99"
documentation_length = "Short"

# Just in case
[macro_expansion]
bitflags = true

# Documentation for cbindgen is fucked man
# Edit: I've found it!!! https://github.com/mozilla/cbindgen/blob/master/docs.md
[parse]
parse_deps = false
include = []
exclude = []
clean = true
extra_bindings = []

# leaving options just in case
[fn]
prefix = ""
postfix = ""
args = "Horizontal"
must_use = "__attribute__((warn_unused))"

# Writing out explicitly (just in case, as well)
[struct]
derive_constructor = false # don't need 
derive_eq = false
derive_neq = false
derive_lt = false
derive_lte = false
derive_gt = false
derive_gte = false
derive_ostream = false

# Since the bindings are for C, use prefix_with_names. To avoid name collisions.
[enum]
add_sentinel = true
prefix_with_name = true
# prefix_with_name = false
derive_helper_methods = true
enum_class = false # since we already use prefix_with_name

# yes please, use C++ features
[const]
allow_static_const = true
allow_constexpr = true 

# Why is this field documented so poorly, I've spend hours searching
# for that document on github, docs on rust's site are broken man
#
# Apperantly you just copy-paste whatever the argument for cfg(), but 
# then delete the quotes from feature name or targes_os name
[defines]
"feature = multithread" = "MULTITHREAD"

